
import absdragsvc from "./absdragsvc";
import LXCOM from '../../common/common.js'
import { GlobalVar } from "../../common/globalvar";
import { LGXEnums } from "../../common/sysenum";

class RectDragDropSvc extends absdragsvc.AbsDragSvc{
    assignProp(worldPos,mapscale){
        var position = this.graph.getPos();
        let wid = 120;
        let hgt = 60;
        var p1 = new LXCOM.LGXPoint();
        p1.x = worldPos.x - wid;
        p1.y = worldPos.y + hgt;

        var p2 = new LXCOM.LGXPoint();
        p2.x = worldPos.x + wid;
        p2.y = worldPos.y + hgt;

        var p3 = new LXCOM.LGXPoint();
        p3.x = worldPos.x + wid;
        p3.y = worldPos.y - hgt;

        var p4 = new LXCOM.LGXPoint();
        p4.x = worldPos.x - wid;
        p4.y = worldPos.y - hgt;
        position.clear();
        position.posList.push(p1);
        position.posList.push(p2);
        position.posList.push(p3);
        position.posList.push(p4);

        this.graph._fillDef.fillStyle = LGXEnums.LGXFillStyle.SOLID;
        this.graph._fillDef.fillColor.clone(GlobalVar.visoDefaultFillColor);
    }
}
export default{RectDragDropSvc}